/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */
export const  radioTwoList=[
  {value:'-1',name:'全部'},
  {value:'1',name:'本部'},
  {value:'0',name:'所属机构'}
]
import request from '@/router/axios'
import store from "@/store";

export function fetchList(query) {
  return request({
    url: '/hetongrenwu-contract/hetonghtxxdjb/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/hetongrenwu/hetonghtxxdjb',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/appr-contract/hetonghtxxdjb/' + id,
    method: 'get'
  })
}
// /updateBatchZhiBiaoState
// 拟定的批量审核
export function updateBatchZhiBiaoState(obj) {
  return request({
    url: '/appr-contract/hetonghtzb/updateBatchZhiBiaoState',
    method: 'post',
    data: obj
  })
}
export function delObj(id) {
  return request({
    url: '/hetongrenwu/hetonghtxxdjb/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/hetongrenwu/hetonghtxxdjb',
    method: 'put',
    data: obj
  })
}
//合同创建-判断当前登录角色是否有绩效考核办公室，是的话才可以新增
export function confirmRole() {
  return request({
    url: '/appr-contract/hetonghtcj/confirmRole',
    method: 'get'
  })
}
//判断是否有指标，有指标提示是否直接汇总，
export function confirmZbExist(query) {
  return request({
    url: '/appr-contract/hetonghtcj/confirmZbExist',
    method: 'get',
    params: query
  })
}
//判断指标中是否填写目标值，有目标值提示是否直接汇总
export function isExistMubiao(query) {
  return request({
    url: '/appr-contract/hetonghtcj/isExistMubiao',
    method: 'get',
    params: query
  })
}

export function changeAss(query){
  return request({
    url: '/appr-contract/hetonghtcj/changeAss',
    method: 'get',
    params: query
  })
}

export function exportWord() {
  return request({
    url: '/appr-contract/hetonghtcj/exportWord',
    method: 'post',
    responseType: 'blob'
  })
}
